/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package beans;

import java.io.Serializable;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 *
 * @author Alexandre
 */

@Entity
public class Recado implements Serializable{
    
    @Id
    @GeneratedValue(strategy= GenerationType.IDENTITY)
    private Long id;
    @ManyToOne
    private Usuario userSender;
    @ManyToOne
    private Usuario userReceiver;
    @OneToMany
    private List<Comentario> comentarios;
    private String texto;
    @Temporal(TemporalType.TIMESTAMP)
    private Date dataEnvio;

    public List<Comentario> getComentarios() {
        return comentarios;
    }

    public void setComentarios(List<Comentario> comentarios) {
        this.comentarios = comentarios;
    }

    public Date getDataEnvio() {
        return dataEnvio;
    }

    public void setDataEnvio(Date dataEnvio) {
        this.dataEnvio = dataEnvio;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getTexto() {
        return texto;
    }

    public void setTexto(String texto) {
        this.texto = texto;
    }

    public Usuario getUserReceiver() {
        return userReceiver;
    }

    public void setUserReceiver(Usuario userReceiver) {
        this.userReceiver = userReceiver;
    }

    public Usuario getUserSender() {
        return userSender;
    }

    public void setUserSender(Usuario userSender) {
        this.userSender = userSender;
    }
    
    
    
}
